<?php
require_once "../Common/database.php";
if($_POST[delete]=='checked')
{
 $query="DELETE FROM tblLinks WHERE `Key`='$_POST[key]'";


}
else
{
$query="UPDATE tblLinks SET Name='$_POST[name]', Link='$_POST[link]', Folder='$_POST[folder]' WHERE `Key`='$_POST[key]'";


}
mysql_query($query);

echo '<h3><center>Link Updated '.$_POST[name];
echo '<p><a href="../index.php?p=lview">Back</a>';
?>